Advancement of computing systems has allowed a software program to run as one or more execution entities, such as threads, processes, and so forth. Usually, such a software program may cause thread context switching running from one thread to another. As a result, resources are allocated dynamically to coordinate activities among execution entities. For example, a synchronization mechanism is activated when more than one threads in a process concurrently request a single-thread service which allows only one thread to access at a time. Usually, synchronization mechanism requires allocation of synchronization resources such as events, mutexes, or locks, etc. Therefore, available resources for execution entities are reduced and the performance of a computing system can be compromised when synchronizing threads.
Although it may be possible to dedicate a single thread to perform a single thread task, such a thread is likely to idle most of the time wasting valuable computing resources when no request is present for its service. Additionally, a thread has to communicate with the single thread to obtain its service. Often times, communications between threads may incur message passing, queuing, and/or notifications, etc. which, again, may drain away resources from computing systems.
Therefore, system performance can be improved if multiple threads are synchronized leveraging existing mechanisms already established, such as thread context switching in a multi-threading system, without requiring allocating additionally resources.